#ifndef CANDIDATE_H
#define CANDIDATE_H

#include <vector>

class Candidate
{
public:
    Candidate();
    Candidate(std::vector<float> genome);
    Candidate(int genomeSize, float fitness);
    virtual void swapSubString(Candidate* mate,int crossoverIndex);
    virtual void mutate(float mutationRate,float mutationAmount);

    ~Candidate();
    int compareTo(Candidate candidate);
    float getFitness();
    void setFitness(float fitness);
    void addChromosome(float value);
    void setChromosome(int index,float value);
    float getChromosome(int index);
    std::vector<float> getGenome();
    int getLength();
    void clone(Candidate* parent);
    void printGenome();
    void setFinalValue(float finalValue);
    float getFinalValue();
    virtual void extremalOptimization(int chromosome);
    virtual void variation();
protected:
    std::vector<float> genome;
    int genomeSize;
    float fitness;
    float finalValue;
};

#endif // CANDIDATE_H
